import java.io.Serializable;

/**
 * This class is SQL
 */
public class SQL implements Serializable {

	Object object;
	int sqlNum;
	
	/**
	* Constructs an instance of SQL.
	* @param o
	* @param num
	*/
	public SQL(Object o, int num ) {
		object = o;
		sqlNum = num;
	}
	/**
	 * This method sends the message to the client	
	 */
	public void accept() {
		Global.chat.accept(this);
	}

	/**
	 * This method sends the message to the client	
	 */
	public Object getMsg(){  
		System.out.println("in while at getMsg");
		Object o = Global.chat.getMsg(); 
		while (o == null)
			o = Global.chat.getMsg();
		System.out.println("SQL get msg >>>> " + o.toString());
		return o;
	}
}
